// 油价数据类型定义

export interface OilPriceData {
  /** 省份/地区 */
  province: string;
  /** 92号汽油价格 */
  price92: number;
  /** 95号汽油价格 */
  price95: number;
  /** 98号汽油价格 */
  price98: number;
  /** 0号柴油价格 */
  price0: number;
  /** 更新时间 */
  updateTime: Date;
  /** 数据来源 */
  source: string;
}

export interface OilPriceResponse {
  success: boolean;
  message: string;
  data: OilPriceData[];
  lastUpdate: Date;
  totalCount: number;
}

export interface OilPriceQuery {
  /** 省份筛选 */
  province?: string;
  /** 燃油类型筛选 */
  fuelType?: '92' | '95' | '98' | '0';
  /** 是否只显示最新数据 */
  latest?: boolean;
}

export interface OilPriceStatistics {
  /** 全国平均价格 */
  nationalAverage: {
    price92: number;
    price95: number;
    price98: number;
    price0: number;
  };
  /** 最高价格地区 */
  highestPrice: {
    province: string;
    price92: number;
    price95: number;
    price98: number;
    price0: number;
  };
  /** 最低价格地区 */
  lowestPrice: {
    province: string;
    price92: number;
    price95: number;
    price98: number;
    price0: number;
  };
  /** 价格变化趋势 */
  trend: {
    price92: number;
    price95: number;
    price98: number;
    price0: number;
  };
}

export interface OilPriceUpdateRequest {
  /** 是否强制更新 */
  force?: boolean;
  /** 指定数据源 */
  source?: string;
}

export interface OilPriceUpdateResponse {
  success: boolean;
  message: string;
  data: {
    updatedCount: number;
    totalCount: number;
    updateTime: Date;
    nextUpdateTime: Date;
  };
}
